<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>js01</title>
    </head>
    <body>

        <div  onclick="f();" >请点击</div>
        
        <script>
            document.querySelector('div').style.width='100px';
            document.querySelector('div').style.height='100px';
            document.querySelector('div').style.border='1px solid blue';
            document.querySelector('div').style.overflow='hidden';

            var i=0;
           function f(){
               i++;
               if(i==1){
                alert('不要点我！')
               }else if(i==2){
                alert('怎么还点我！')
               }else{
                   alert("不玩了！");
                   //document.querySelector('div').style.display='none';
                   reduce();
               }
            
           }

           function reduce(){
            var div = document.querySelector('div');
            var newWidth = parseInt(div.style.width)-1;
            var newHeight = parseInt(div.style.height)-1;
            if(newWidth>0||newHeight>0){
                div.style.width=newWidth+'px';
                div.style.height=newHeight+'px';
                setTimeout('reduce()',10);
            }else{
                div.style.width='0px';
                div.style.height='0px';
                div.style.border='none';
            }
           }

           function fn1(){
               console.log("88888888888888888");
           }

           function fn2(a,b){
              return a*b;
           }

           fn1();

           var result = fn2(6,9);
           console.log(result);
            
        </script>


    </body>
</html>